import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import naive from 'naive-ui';
import 'normalize.css';
import * as VueRouter from 'vue-router';

import FanList from './pages/FanList.vue'
import AboutPage from './pages/About.vue'
import Framework from './Framework.vue'

const routes = [
    {
        path: '', component: Framework, children: [
            { path: '', component: FanList },
            { path: '/fanList', component: FanList },
            { path: '/globalConfig', component: AboutPage },
            { path: '/fanListInvisible', component: FanList },
            { path: '/:pathMatch(.*)*', component: { }, },
        ]
    },
]


const app = createApp(App);
app.use(naive);
app.use(VueRouter.createRouter({
    // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
    history: VueRouter.createWebHistory(),
    routes, // `routes: routes` 的缩写
}));
app.mount('#app');
